import api from './index.js';
import Cookies from 'js-cookie'
const token = Cookies.get("token")
const HttpGet = (url) => {
    return api({
        url: url,
        method: 'get',
        headers: {
            'TOKEN': `${token}`
        },
        success: (result) => {
            result.data;
        },
        fail: (err) => {
            err;
        },
    });
}
const HttpPost = (url, data) => {

    return api({
        url: url,
        data: data,
        method: 'post',
        headers: {
            'TOKEN': `${token}`
        },
        success: (result) => {
            result.data;
        },
        fail: (err) => {
            err;
        },
    });
}
export default {
    HttpGet,
    HttpPost
}
